#coding=utf-8
"""
Author:王霄
Time:2025/3/4 09:59
website:https://duoceshi.net
"""
import sys
sys.path.append('..')
from utiles.handle_conf import conf
from utiles.handle_requests import Send_Requests
from utiles.base_login import Cms_Login

class Cms_Search():
    request=Send_Requests()
    request=Cms_Login().login()
    def search(self):
        url=conf.get_value('env','url')+conf.get_value('search','url')
        data=eval(conf.get_value('search','data'))
        headers=eval(conf.get_value('search','headers'))
        response=self.request.send(method='post',url=url,data=data,headers=headers)
        result=response.json()
        for i in result['model']['userList']:
            if i['userAccount']==data['searchValue']:
                id = i['id']
        return id






if __name__ == '__main__':
    s=Cms_Search()
    print(s.search())

